<template>
	<view>
		<view class="bag-header-content" style="background-color: white;">
			<view class="bag-header-left">
				<view class="line"></view>
				<view class="bag-header-title">合资品牌</view>
			</view>

			<view class="bag-top-list">
				<view class="bag-top-list-item" v-for="(item, index) in brandList" :key="index">
					<image class="bag-top-item-image" :src="item.thumb" mode="aspectFill"></image>
					<view class="bag-top-item-mark">
						{{item.name}}
					</view>
				</view>
			</view>
		</view>
		<view class="bag-header-content" >
			<view class="bag-header-left">
				<view class="line"></view>
				<view class="bag-header-title">楼盘套餐</view>
			</view>

			<view class="building-list">
				<view class="building-item" v-for="(item,index) in comboList" :key="index">
					<view>
						<view class="building-item-image">
							<image :src="item.thumb" mode="aspectFill"></image>
						</view>
						<view class="building-text-content">
							<view class="building-item-title">{{item.name}}</view>
							<view class="building-item-info">
								<view class="building-item-size">{{item.mode}}</view>
								<view class="building-item-price">¥{{item.price}}</view>
							</view>
							<view class="building-item-content">{{item.desc_str}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				comboList: [],
				brandList: []
			};
		},
		onLoad(e) {
			uni.request({
				url: 'https://baiyi.kent.work/api/v1/system/getComboList',
				method: 'POST',
				data: {
					page: 1,
					limit: 10
				},
				success: res => {
					console.log(res)
					this.comboList = res.data.data.list
				}
			});
			uni.request({
				url: 'https://baiyi.kent.work/api/v1/system/getBrandList',
				method: 'POST',
				success: res => {
					console.log(res)
					this.brandList = res.data.data
				}
			})
		},
		methods: {
			
		}
	};
</script>

<style lang="less" scoped>
	::-webkit-scrollbar {
		display: none;
	}

	.bag-top-list {
		overflow-x: scroll;
		overflow-y: hidden;
		display: flex;
		flex-direction: row;
		margin-top: 20rpx;
	}

	.bag-header-title {
		font-family: PingFang SC, PingFang SC-Bold;
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		margin-left: 20rpx;
	}
	.bag-top-list-item {
		position: relative;
		display: flex;
		margin-left: 40rpx;
	}

	.bag-top-list-item:last-child {
		margin-right: 40rpx;
	}

	.bag-top-item-image {
		height: 168rpx;
		width: 280rpx;
		border-radius: 8rpx;
	}

	.bag-header-content {
		display: flex;
		flex-direction: column;
		padding: 28rpx 0;
	}

	.bag-header-left {
		margin-left: 40rpx;
	}


	.line {
		width: 8rpx;
		height: 30rpx;
		background: #3d9c36;
	}


	.building-list {
		display: grid;
		grid-gap: 40rpx;
		grid-template-columns: 1fr 1fr;
		margin: 0rpx 40rpx;
		padding-bottom: 40rpx;
	}

	.building-item {
		width: 100%;
		background-color: white;
		border-radius: 16rpx;
	}

	.building-item-image>image {
		border-radius: 12rpx 12rpx 0rpx 0rpx;
			width: 100%;
			display: block;
		
	}

	.bag-top-item-mark {
		position: absolute;
		left: 0;
		top: 0;
		height: 168rpx;
		width: 280rpx;
		border-radius: 8rpx;
		line-height: 168rpx;
		text-align: center;
		color: white;
		background: rgba(0, 0, 0, 0.10);

	}

	.building-item-title {
		font-family: PingFang SC, PingFang SC-Medium;
		color: #333333;
		font-size: 30rpx;
		font-weight: 500;
		margin-left: 20rpx;
	}

	.building-item-size {
		font-family: PingFang SC, PingFang SC-Medium;
		color: #666666;
		font-size: 24rpx;
		font-weight: 500;
		margin-left: 20rpx;
	}

	.building-item-price {
		font-family: PingFang SC, PingFang SC-Bold;
		font-size: 32rpx;
		font-weight: 500;
		color: #e54040;
		margin-right: 20rpx;
	}

	.building-item-info {
		display: flex;
		justify-content: space-between;
		align-items: baseline;

	}

	.building-item-content {
		font-family: PingFang SC, PingFang SC-Medium;
		font-size: 22rpx;
		color: #666666;
		margin: 8rpx 20rpx 20rpx 20rpx;
	}

	.building-text-content {
		padding: 16rpx 20rpx;
			background-color: white;
			border-radius: 0rpx 0rpx 12rpx 12rpx;
		
	}
</style>